//
//  Help.swift
//  JKTool
//
//  Created by 姜奎 on 2022/7/19.
//

import Foundation

extension JKTool {
    struct Config: ParsableCommand {
        static var configuration = CommandConfiguration(
            commandName: "config",
            _superCommandName: "jktool",
            abstract: "config文件格式",
            version: "1.0.0")
        mutating func run() {
            po(tip: """
               ‘’‘
               {
                 "sdk": "iOS/iPadOS/macOS/tvOS/watchOS/carPlayOS",
                 "certificateConfig": {
                   "macPwd": "mac密码",
                   "p12sPath": "路径",
                   "p12Pwd": "p12文件密码",
                   "profilesPath": "路径"
                 },
               "secConfig": {
                    "configurationList": ["All"],
                    "secModuleList": ["LBKFoundation"],
                    "version":"4.8.2",
                    "scriptPathName":"native_tools_mac_250311.1",
                    "licenseFileName":"sec_license.lic",
                    "versionConfigFileName":"sec_config.xml",
                    "logFileName":"sec_log.log",
                    "versionFileName":"sec_version.txt"
               },
                 "sonarLintConfig": {
                     "inferCommand":"infer绝对路径",
                     "swiftlintCommand":"swiftlint绝对路径",
                     "xcprettyCommand":"xcpretty绝对路径",
                     "oclintCommand":"oclint绝对路径",
                     "sonarScannerCommand":"sonar-scanner绝对路径",
                     "inferConfigPath": ".inferconfig",
                     "oclintConfigPath": ".oclint",
                     "swiftlintConfigPath": ".swiftlint.yml"
                 },
                 "exportConfigList": [
                   {
                     "configuration": "Debug",
                     "exportOptionsPath": "export.plist路径",
                     "saveConfig": {
                       "path": "另存的路径"
                     }
                   },
                   {
                     "configuration": "Release",
                     "exportOptionsPath": "export.plist路径",
                     "saveConfig": {
                       "path": "另存的路径"
                     }
                   }
                 ],
                 "uploadConfig": {
                   "accountAuthConfig": {
                     "username": "appleid账户",
                     "password": "account专用密码"
                   },
                   "apiAuthConfig": {
                     "apiKey": "String",
                     "apiIssuerID": "String",
                     "authKeyPath": "authKeyPath路径"
                   },
                   "needConfigurationInProductsPath": "是否在产物路径中加入环境参数"
                   "ipaPath": "ipa路径"
                 }
               }
               ’‘’
               """)
        }
    }
}
